Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Nonacc 63 posts 184 karma points
    Nov 05, 2012 @ 15:35
    Nonacc
    0

    How to | Use Umbraco Api Through Winforms?

    Is this possible?
    To use umbraco api through winforms?
    I try to do this:

    var dt = new DocumentType(1244);
    var u = new User(0);
    var parentId = 1146;
    var d = Document.MakeNew("test through winforms", dt, u, parentId);

     

    But when it comes to "Document.MakeNew" it throws me that error:

    Message:Object reference not set to an instance of an object.
    at Umbraco.Core.Configuration.UmbracoSettings.GetKey(String key)
    at Umbraco.Core.Configuration.UmbracoSettings.get_EnableLogging()
    at umbraco.UmbracoSettings.get_EnableLogging()
    at umbraco.BusinessLogic.Log.Add(LogTypes type, User user, Int32 nodeId, String comment)
    at umbraco.cms.businesslogic.web.Document.MakeNew(String Name, DocumentType dct, User u, Int32 ParentId)

    Does anyone have any idea what i'm doing wrong?
    And is it possible? 
    If possible, can someone give me an working example?

    I'm using dlls of version 4.9.1 

Please Sign in or register to post replies

Write your reply to:

Draft